<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<script>
		// IIFE
		(function () {
			console.log("test");
		})();

		(function() {
			console.log("test222222");
		}());

		+function(){
			console.log("test33333333");
		}();

		!function(){
			console.log("test444444");
		}();
		
	</script>

	<script>
		function test() {
			(function (){
				for (var i = 0; i < 5; i++) {
					console.log(i);
				}
			})();
			console.log("后：" + i);
		}

		test();
	</script>
</body>
</html>